package com.zjp.mapper;

import com.zjp.vo.NucleicAndDection;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface NucleicAndDectionMapper {
    /**
     * 我的检测记录
     */
    @Select("select n.*,d.name,u.name userName,u.tel,u.idCard from zjp.nucleic_test n left join zjp.detection_point d on n.detectionid=d.Detectionid left join zjp.user u on n.userid=u.Id where u.Id=#{id};")
    List<NucleicAndDection> selectMyNucleicResult(long id);

    /**
     * 查询全部核酸结果
     *
     * @return
     */
    @Select("select n.*,d.name,u.name userName,u.tel,u.idCard from zjp.nucleic_test n left join zjp.detection_point d on n.detectionid=d.Detectionid left join zjp.user u on n.userid=u.Id")
    List<NucleicAndDection> selectAllNucleicResult();
}
